<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8"/>
    <title>Test Report</title>
    <style>body {
	font-family: Helvetica, Arial, sans-serif;
	font-size: 12px;
	min-width: 1200px;
	color: #999;
}

h1 {
	font-size: 24px;
	color: black;
}

h2 {
	font-size: 16px;
	color: black;
}

p {
    color: black;
}

a {
	color: #999;
}

table {
	border-collapse: collapse;
}

/******************************
 * SUMMARY INFORMATION
 ******************************/

#environment td {
	padding: 5px;
	border: 1px solid #E6E6E6;
}

#environment tr:nth-child(odd) {
	background-color: #f6f6f6;
}

/******************************
 * TEST RESULT COLORS
 ******************************/
span.passed, .passed .col-result {
	color: green;
}
span.skipped, span.xfailed, span.rerun, .skipped .col-result, .xfailed .col-result, .rerun .col-result {
	color: orange;
}
span.error, span.failed, span.xpassed, .error .col-result, .failed .col-result, .xpassed .col-result  {
	color: red;
}


/******************************
 * RESULTS TABLE
 *
 * 1. Table Layout
 * 2. Extra
 * 3. Sorting items
 *
 ******************************/

/*------------------
 * 1. Table Layout
 *------------------*/

#results-table {
	border: 1px solid #e6e6e6;
	color: #999;
	font-size: 12px;
	width: 100%
}

#results-table th, #results-table td {
	padding: 5px;
	border: 1px solid #E6E6E6;
	text-align: left
}
#results-table th {
	font-weight: bold
}

/*------------------
 * 2. Extra
 *------------------*/

.log:only-child {
	height: inherit
}
.log {
	background-color: #e6e6e6;
	border: 1px solid #e6e6e6;
	color: black;
	display: block;
	font-family: "Courier New", Courier, monospace;
	height: 230px;
	overflow-y: scroll;
	padding: 5px;
	white-space: pre-wrap
}
div.image {
	border: 1px solid #e6e6e6;
	float: right;
	height: 240px;
	margin-left: 5px;
	overflow: hidden;
	width: 320px
}
div.image img {
	width: 320px
}
.collapsed {
	display: none;
}
.expander::after {
	content: " (show details)";
	color: #BBB;
	font-style: italic;
	cursor: pointer;
}
.collapser::after {
	content: " (hide details)";
	color: #BBB;
	font-style: italic;
	cursor: pointer;
}

/*------------------
 * 3. Sorting items
 *------------------*/
.sortable {
	cursor: pointer;
}

.sort-icon {
	font-size: 0px;
	float: left;
	margin-right: 5px;
	margin-top: 5px;
	/*triangle*/
	width: 0;
	height: 0;
	border-left: 8px solid transparent;
	border-right: 8px solid transparent;
}

.inactive .sort-icon {
	/*finish triangle*/
	border-top: 8px solid #E6E6E6;
}

.asc.active .sort-icon {
	/*finish triangle*/
	border-bottom: 8px solid #999;
}

.desc.active .sort-icon {
	/*finish triangle*/
	border-top: 8px solid #999;
}
</style></head>
  <body onLoad="init()">
    <script>/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/. */


function toArray(iter) {
    if (iter === null) {
        return null;
    }
    return Array.prototype.slice.call(iter);
}

function find(selector, elem) {
    if (!elem) {
        elem = document;
    }
    return elem.querySelector(selector);
}

function find_all(selector, elem) {
    if (!elem) {
        elem = document;
    }
    return toArray(elem.querySelectorAll(selector));
}

function sort_column(elem) {
    toggle_sort_states(elem);
    var colIndex = toArray(elem.parentNode.childNodes).indexOf(elem);
    var key;
    if (elem.classList.contains('numeric')) {
        key = key_num;
    } else if (elem.classList.contains('result')) {
        key = key_result;
    } else {
        key = key_alpha;
    }
    sort_table(elem, key(colIndex));
}

function show_all_extras() {
    find_all('.col-result').forEach(show_extras);
}

function hide_all_extras() {
    find_all('.col-result').forEach(hide_extras);
}

function show_extras(colresult_elem) {
    var extras = colresult_elem.parentNode.nextElementSibling;
    var expandcollapse = colresult_elem.firstElementChild;
    extras.classList.remove("collapsed");
    expandcollapse.classList.remove("expander");
    expandcollapse.classList.add("collapser");
}

function hide_extras(colresult_elem) {
    var extras = colresult_elem.parentNode.nextElementSibling;
    var expandcollapse = colresult_elem.firstElementChild;
    extras.classList.add("collapsed");
    expandcollapse.classList.remove("collapser");
    expandcollapse.classList.add("expander");
}

function show_filters() {
    var filter_items = document.getElementsByClassName('filter');
    for (var i = 0; i < filter_items.length; i++)
        filter_items[i].hidden = false;
}

function add_collapse() {
    // Add links for show/hide all
    var resulttable = find('table#results-table');
    var showhideall = document.createElement("p");
    showhideall.innerHTML = '<a href="javascript:show_all_extras()">Show all details</a> / ' +
                            '<a href="javascript:hide_all_extras()">Hide all details</a>';
    resulttable.parentElement.insertBefore(showhideall, resulttable);

    // Add show/hide link to each result
    find_all('.col-result').forEach(function(elem) {
        var collapsed = get_query_parameter('collapsed') || 'Passed';
        var extras = elem.parentNode.nextElementSibling;
        var expandcollapse = document.createElement("span");
        if (collapsed.includes(elem.innerHTML)) {
            extras.classList.add("collapsed");
            expandcollapse.classList.add("expander");
        } else {
            expandcollapse.classList.add("collapser");
        }
        elem.appendChild(expandcollapse);

        elem.addEventListener("click", function(event) {
            if (event.currentTarget.parentNode.nextElementSibling.classList.contains("collapsed")) {
                show_extras(event.currentTarget);
            } else {
                hide_extras(event.currentTarget);
            }
        });
    })
}

function get_query_parameter(name) {
    var match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search);
    return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
}

function init () {
    reset_sort_headers();

    add_collapse();

    show_filters();

    toggle_sort_states(find('.initial-sort'));

    find_all('.sortable').forEach(function(elem) {
        elem.addEventListener("click",
                              function(event) {
                                  sort_column(elem);
                              }, false)
    });

};

function sort_table(clicked, key_func) {
    var rows = find_all('.results-table-row');
    var reversed = !clicked.classList.contains('asc');
    var sorted_rows = sort(rows, key_func, reversed);
    /* Whole table is removed here because browsers acts much slower
     * when appending existing elements.
     */
    var thead = document.getElementById("results-table-head");
    document.getElementById('results-table').remove();
    var parent = document.createElement("table");
    parent.id = "results-table";
    parent.appendChild(thead);
    sorted_rows.forEach(function(elem) {
        parent.appendChild(elem);
    });
    document.getElementsByTagName("BODY")[0].appendChild(parent);
}

function sort(items, key_func, reversed) {
    var sort_array = items.map(function(item, i) {
        return [key_func(item), i];
    });
    var multiplier = reversed ? -1 : 1;

    sort_array.sort(function(a, b) {
        var key_a = a[0];
        var key_b = b[0];
        return multiplier * (key_a >= key_b ? 1 : -1);
    });

    return sort_array.map(function(item) {
        var index = item[1];
        return items[index];
    });
}

function key_alpha(col_index) {
    return function(elem) {
        return elem.childNodes[1].childNodes[col_index].firstChild.data.toLowerCase();
    };
}

function key_num(col_index) {
    return function(elem) {
        return parseFloat(elem.childNodes[1].childNodes[col_index].firstChild.data);
    };
}

function key_result(col_index) {
    return function(elem) {
        var strings = ['Error', 'Failed', 'Rerun', 'XFailed', 'XPassed',
                       'Skipped', 'Passed'];
        return strings.indexOf(elem.childNodes[1].childNodes[col_index].firstChild.data);
    };
}

function reset_sort_headers() {
    find_all('.sort-icon').forEach(function(elem) {
        elem.parentNode.removeChild(elem);
    });
    find_all('.sortable').forEach(function(elem) {
        var icon = document.createElement("div");
        icon.className = "sort-icon";
        icon.textContent = "vvv";
        elem.insertBefore(icon, elem.firstChild);
        elem.classList.remove("desc", "active");
        elem.classList.add("asc", "inactive");
    });
}

function toggle_sort_states(elem) {
    //if active, toggle between asc and desc
    if (elem.classList.contains('active')) {
        elem.classList.toggle('asc');
        elem.classList.toggle('desc');
    }

    //if inactive, reset all other functions and add ascending active
    if (elem.classList.contains('inactive')) {
        reset_sort_headers();
        elem.classList.remove('inactive');
        elem.classList.add('active');
    }
}

function is_all_rows_hidden(value) {
  return value.hidden == false;
}

function filter_table(elem) {
    var outcome_att = "data-test-result";
    var outcome = elem.getAttribute(outcome_att);
    class_outcome = outcome + " results-table-row";
    var outcome_rows = document.getElementsByClassName(class_outcome);

    for(var i = 0; i < outcome_rows.length; i++){
        outcome_rows[i].hidden = !elem.checked;
    }

    var rows = find_all('.results-table-row').filter(is_all_rows_hidden);
    var all_rows_hidden = rows.length == 0 ? true : false;
    var not_found_message = document.getElementById("not-found-message");
    not_found_message.hidden = !all_rows_hidden;
}
</script>
    <h1>report.html</h1>
    <p>Report generated on 05-Mar-2019 at 10:28:51 by<a href="https://pypi.python.org/pypi/pytest-html"> pytest-html</a> v1.19.0</p>
    <h2>Environment</h2>
    <table id="environment">
      <tr>
        <td>JAVA_HOME</td>
        <td>/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home</td></tr>
      <tr>
        <td>Packages</td>
        <td>{&apos;pytest&apos;: &apos;4.0.0&apos;, &apos;py&apos;: &apos;1.7.0&apos;, &apos;pluggy&apos;: &apos;0.8.0&apos;}</td></tr>
      <tr>
        <td>Platform</td>
        <td>Darwin-17.7.0-x86_64-i386-64bit</td></tr>
      <tr>
        <td>Plugins</td>
        <td>{&apos;xdist&apos;: &apos;1.24.1&apos;, &apos;rerunfailures&apos;: &apos;5.0&apos;, &apos;metadata&apos;: &apos;1.7.0&apos;, &apos;html&apos;: &apos;1.19.0&apos;, &apos;forked&apos;: &apos;0.2&apos;, &apos;allure-adaptor&apos;: &apos;1.7.10&apos;}</td></tr>
      <tr>
        <td>Python</td>
        <td>3.7.1</td></tr></table>
    <h2>Summary</h2>
    <p>1 tests ran in 324.08 seconds. </p>
    <p class="filter" hidden="true">(Un)check the boxes to filter the results.</p><input checked="true" class="filter" data-test-result="passed" disabled="true" hidden="true" name="filter_checkbox" onChange="filter_table(this)" type="checkbox"/><span class="passed">0 passed</span>, <input checked="true" class="filter" data-test-result="skipped" disabled="true" hidden="true" name="filter_checkbox" onChange="filter_table(this)" type="checkbox"/><span class="skipped">0 skipped</span>, <input checked="true" class="filter" data-test-result="failed" hidden="true" name="filter_checkbox" onChange="filter_table(this)" type="checkbox"/><span class="failed">1 failed</span>, <input checked="true" class="filter" data-test-result="error" disabled="true" hidden="true" name="filter_checkbox" onChange="filter_table(this)" type="checkbox"/><span class="error">0 errors</span>, <input checked="true" class="filter" data-test-result="xfailed" disabled="true" hidden="true" name="filter_checkbox" onChange="filter_table(this)" type="checkbox"/><span class="xfailed">0 expected failures</span>, <input checked="true" class="filter" data-test-result="xpassed" disabled="true" hidden="true" name="filter_checkbox" onChange="filter_table(this)" type="checkbox"/><span class="xpassed">0 unexpected passes</span>, <input checked="true" class="filter" data-test-result="rerun" disabled="true" hidden="true" name="filter_checkbox" onChange="filter_table(this)" type="checkbox"/><span class="rerun">0 rerun</span>
    <h2>Results</h2>
    <table id="results-table">
      <thead id="results-table-head">
        <tr>
          <th class="sortable result initial-sort" col="result">Result</th>
          <th class="sortable" col="name">Test</th>
          <th class="sortable numeric" col="duration">Duration</th>
          <th>Links</th></tr>
        <tr hidden="true" id="not-found-message">
          <th colspan="4">No results found. Try to check the filters</th></tr></thead>
      <tbody class="failed results-table-row">
        <tr>
          <td class="col-result">Failed</td>
          <td class="col-name">test_main.py::TestClass::test_Authentication_EU[NO]</td>
          <td class="col-duration">295.37</td>
          <td class="col-links"></td></tr>
        <tr>
          <td class="extra" colspan="4">
            <div><div><img src="" alt="screenshot" style="width:20%;height:20%;" onclick="window.open(this.src)" align="right"/></div></div>
            <div class="log">opt = {&#x27;appLocation&#x27;: &#x27;/Users/annesui/Documents/MBT_24/application/app-debug13.apk&#x27;, &#x27;browser&#x27;: 5, &#x27;bundleId&#x27;: &#x27;com.Monstarbukka.cn&#x27;, &#x27;device&#x27;: 2, ...}<br/>driver = &lt;appium.webdriver.webdriver.WebDriver (session=&quot;1deaaf0a-52e2-4b8a-bc2b-cd1f2da4433e&quot;)&gt;, kwargs = {&#x27;e_EUselectCountry&#x27;: &#x27;NO&#x27;}, a = {1: &#x27;web&#x27;, 2: &#x27;android&#x27;, 3: &#x27;ios&#x27;}<br/>file = &#x27;Authentication_EU&#x27;, script_file = &#x27;Authentication_EU_android&#x27;, end_condition = &#x27;\&#x27;&quot;weighted_random(edge_coverage(100))&quot;\&#x27;&#x27;, speed = 0<br/>model = &#x27;-m model/Authentication_EU.graphml \&#x27;&quot;weighted_random(edge_coverage(100))&quot;\&#x27;&#x27;<br/>gw = &#x27;java -jar graphwalker-cli-4.0.0-SNAPSHOT.jar offline -m model/Authentication_EU.graphml \&#x27;&quot;weighted_random(edge_coverage(100))&quot;\&#x27; -o | jq -r \&#x27;. | .currentElementName, .actions[0].Action, .modelName\&#x27;&#x27;<br/><br/>    def runs(opt, driver, **kwargs):<br/>        a = {1: &quot;web&quot;, 2: &quot;android&quot;, 3: &quot;ios&quot;, }<br/>        file = opt[&quot;file&quot;]  # 执行的模型图<br/>        script_file = &quot;{}_{}&quot;.format(file, a[opt[&quot;device&quot;]])<br/>        end_condition = opt[&quot;end_condition&quot;]<br/>        speed = opt[&quot;speed&quot;]  # 执行速度, 每个操作后的等待时间, 单位为秒<br/>        model_log = &quot;log/{}_model.log&quot;.format(file)  # 模型生成的测试用例保存 log<br/>        test_log = &quot;log/{}_test.log&quot;.format(file)  # 测试执行的 log<br/>        exec(&#x27;from page_script import &#x27; + script_file)  # 导入指定文件的包, 即脚本文件<br/>    <br/>        # 对要执行的模型图名处理, 对中英文逗号进行处理<br/>        file = file.replace(&#x27;,&#x27;, &#x27;.graphml &#x27; + end_condition + &#x27; -m model/&#x27;)<br/>        file = file.replace(&#x27;，&#x27;, &#x27;.graphml &#x27; + end_condition + &#x27; -m model/&#x27;)<br/>        model = &#x27;-m model/&#x27; + str(file) + &#x27;.graphml &#x27; + end_condition<br/>    <br/>        # gw 为要执行的 graphwalker 指令<br/>        gw = &quot;java -jar graphwalker-cli-4.0.0-SNAPSHOT.jar offline &quot; + model + \<br/>             &quot; -o | jq -r &#x27;. | .currentElementName, .actions[0].Action, .modelName&#x27;&quot;<br/>    <br/>        # 将 model 运行结果保存至文件的方法<br/>        def run_cmd2file(cmd):<br/>            fdout = open(model_log, &#x27;w+&#x27;)<br/>            fdout.write(&quot;This is model log&quot;)<br/>            fderr = open(&quot;model_err.log&quot;, &#x27;w+&#x27;)<br/>            p = subprocess.Popen(cmd, stdout=fdout, stderr=fderr, shell=True)<br/>            if p.poll():<br/>                return<br/>            p.wait()<br/>            return<br/>    <br/>        # 将要执行的操作记录进入 test_log<br/>        def editLog(content):<br/>            with open(test_log, &#x27;a+&#x27;) as f2:<br/>                f2.write(&quot;begin........&quot; + content)<br/>    <br/>        # 生成测试用例<br/>        run_cmd2file(gw)<br/>    <br/>        # 创建测试结果保存文件 test_log<br/>        with open(test_log, &#x27;w+&#x27;) as f1:<br/>            f1.write(time.asctime(time.localtime(time.time())) + &quot;\n&quot;)<br/>    <br/>        # 按 model 文件生成的测试用例执行测试,测试结果保存至 test_log 文件<br/>        with open(model_log, &#x27;r+&#x27;) as f:<br/>            for line in f:<br/>                editLog(line)<br/>                # 执行以 e_ 开头的路径并获取传入参数和模块<br/>                if line[:2] == &quot;e_&quot;:<br/>                    value = next(f)<br/>                    # 因为执行了 next 操作,所以需要再记录一次要执行的操作<br/>                    editLog(value)<br/>                    obj = next(f)<br/>                    # 因为执行了 next 操作,所以需要再记录一次要执行的操作<br/>                    editLog(obj)<br/>                    # sub_module = getattr(eval(file), &quot;Action&quot;)(driver)<br/>                    sub_module = eval(script_file).Action(driver)<br/>                    if kwargs:<br/>                        &#x27;&#x27;&#x27;<br/>                        特殊方法，获取从 test_main 中传过来的参数，平时可以注释不用<br/>                        &#x27;&#x27;&#x27;<br/>                        for key, value in kwargs.items():<br/>                            if str(key) in line.strip(&#x27;\n&#x27;):<br/>                                getattr(sub_module, line.strip(&#x27;\n&#x27;))(value)<br/>                            else:<br/>                                # 判断是否有值要传入<br/>                                try:<br/>&gt;                                   getattr(sub_module, line.strip(&#x27;\n&#x27;))(re.search(r&quot;[&#x27;\&quot;](|.+?)[&#x27;\&quot;]&quot;, value).group(1))<br/><span class="error">E                                   AttributeError: &#x27;NoneType&#x27; object has no attribute &#x27;group&#x27;</span><br/><br/>MBT_base.py:73: AttributeError<br/><br/>During handling of the above exception, another exception occurred:<br/><br/>self = &lt;test_main.TestClass object at 0x106a5ceb8&gt;, android = &lt;appium.webdriver.webdriver.WebDriver (session=&quot;1deaaf0a-52e2-4b8a-bc2b-cd1f2da4433e&quot;)&gt;, eu_country = &#x27;NO&#x27;<br/><br/>    def test_Authentication_EU(self, android, eu_country):<br/>        self.options[&#x27;file&#x27;] = &#x27;Authentication_EU&#x27;<br/>        self.options[&#x27;device&#x27;] = 2<br/>&gt;       MBT_base.runs(self.options, android, e_EUselectCountry=eu_country)<br/><br/>test_main.py:78: <br/>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ <br/>MBT_base.py:75: in runs<br/>    getattr(sub_module, line.strip(&#x27;\n&#x27;))()<br/>page_script/Authentication_EU_android.py:123: in e_clickOk<br/>    self.clickOk()<br/>page_script/authentication_public.py:185: in clickOk<br/>    self.wait.until(EC.presence_of_element_located((By.ID, &#x27;com.kopti.kokurabo.revinyl:id/ok_button&#x27;)))<br/>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ <br/><br/>self = &lt;selenium.webdriver.support.wait.WebDriverWait (session=&quot;1deaaf0a-52e2-4b8a-bc2b-cd1f2da4433e&quot;)&gt;<br/>method = &lt;selenium.webdriver.support.expected_conditions.presence_of_element_located object at 0x1075a5400&gt;, message = &#x27;&#x27;<br/><br/>    def until(self, method, message=&#x27;&#x27;):<br/>        &quot;&quot;&quot;Calls the method provided with the driver as an argument until the \<br/>        return value is not False.&quot;&quot;&quot;<br/>        screen = None<br/>        stacktrace = None<br/>    <br/>        end_time = time.time() + self._timeout<br/>        while True:<br/>            try:<br/>                value = method(self._driver)<br/>                if value:<br/>                    return value<br/>            except self._ignored_exceptions as exc:<br/>                screen = getattr(exc, &#x27;screen&#x27;, None)<br/>                stacktrace = getattr(exc, &#x27;stacktrace&#x27;, None)<br/>            time.sleep(self._poll)<br/>            if time.time() &gt; end_time:<br/>                break<br/>&gt;       raise TimeoutException(message, screen, stacktrace)<br/><span class="error">E       selenium.common.exceptions.TimeoutException: Message:</span><br/><br/>/usr/local/lib/python3.7/site-packages/selenium/webdriver/support/wait.py:80: TimeoutException<br/>---------------------------- Captured stdout setup -----------------------------<br/>Success
----------------------------- Captured stdout call -----------------------------<br/>Message: An element could not be located on the page using the given search parameters.

</div></td></tr></tbody></table></body></html>